<?php
class Managesoftware_Data_Removeaction {
	
	private $secure;
	private $database;
	
	public function __construct(){
		$this->secure = new Core_Data_Secure();
		$this->database = new Core_Driver_MysqlImproved();
	}
	
	public function removeValues($getVars){
		
		$getVars = $this->secure->parseData($getVars);
		
		$this->database->connect();
		$name = $getVars['name'];
		
		$name = $this->database->escape($name);
		
		$this->database->prepare(
			"DELETE FROM software WHERE software_name = '$name';"
		);
		
		$this->database->query();
		$this->database->dataOperations();
		
		echo '<meta http-equiv="Refresh" content="0;url='.SERVER_ROOT.'?managesoftware">';
		
	}
}